#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e6+1000;
typedef long long LL;
const LL mod=998244353;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL dp[maxn],sum[maxn],num[maxn];
int main(void){
   	cin.tie(0);std::ios::sync_with_stdio(false);
    for(LL i=1;i*i<maxn;i++){
        for(LL j=i;i*j<maxn;j++){
            num[i*j]+=2;
            if(i==j) num[i*j]--;
        }
    }
    dp[1]=1;sum[1]=1;
    for(LL i=2;i<maxn;i++){
        dp[i]=(sum[i-1]+num[i])%mod;
        sum[i]=(sum[i-1]+dp[i])%mod;
    }
    LL n;cin>>n;
    cout<<dp[n]<<"\n";
   	return 0;
}
